38db8cf6119010959bfb7158a4c2463af2ece51f,src/test/java/pl/szczepanik/silencio/processors/PropertiesProcessorTest.java,PropertiesProcessorTest,shouldReportExceptionOnUnsupportedModel,#,52
Before Change
processor.setConverters(new Converter[] { new StubConverter() });
// then
try {
ReflectionUtils.invokeMethod(processor, "processComplex", Void.class, key, value);
fail("expected exception");
} catch (Exception e) {
assertThat(e).isInstanceOf(ProcessorException.class);
assertThat(e.getMessage()).isEqualTo("Unknown type of the key: " + value.getClass().getName());
}
}
After Change
// then
thrown.expect(ProcessorException.class);
thrown.expectMessage("Unknown type of the key: " + value.getClass().getName());
ReflectionUtils.invokeMethod(processor, "processComplex", Void.class, key, value);
}